package string;

/**
 * @author Huangjin
 * @version 1.0
 * describe:
 * @date 2023/2/28 14:55
 */
public class SubStringDemo {
    public static void main(String[] args) {

        String str = "www.tedu.cn";
        int start = str.indexOf(".")+1;
        int end = str.indexOf(".",start);
        String name = str.substring(start,end);
        System.out.println(name);
    }
}
